package designpatterns.factory.simple.code;

public class Client {
    public static void main(String[] args) throws Exception {
        // 加法
        ArithmeticOperationFactory factory = new ArithmeticOperationFactory();
        System.out.println(factory.createArithmeticOperation(OperationTypeConstant.ADD).operation(1,1));
        System.out.println(factory.createArithmeticOperation(OperationTypeConstant.SUB).operation(1,1));
        System.out.println(factory.createArithmeticOperation(OperationTypeConstant.MUB).operation(1,1));
        System.out.println(factory.createArithmeticOperation(OperationTypeConstant.DIV).operation(1,1));

    }
}
